﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChiTietHoaDonXuatAdd.aspx.cs" Inherits="WebApplication.Admin.ChiTietHoaDonXuatAdd" MasterPageFile="~/Admin/Web.Master" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ContentPlaceHolderID="Header" runat="server">
    <script src="assets/combobox/jquery-1.9.1.js" type="text/javascript"></script>
    <link href="assets/combobox/jquery-ui-1.10.3.custom.css" rel="stylesheet" type="text/css" />
    <script src="assets/combobox/jquery-ui-1.10.3.custom.js" type="text/javascript"></script>
 <style>
     
  .custom-combobox {
    position: relative;
    display: inline-block;
  }
  .custom-combobox-toggle {
    position: absolute;
    top: 0;
    bottom: 0;
    margin-left: -1px;
    padding: 0;
    /* support: IE7 */
    *height: 1.7em;
    *top: 0.1em;
  }
  .custom-combobox-input {
    margin: 0;
    padding: 0.3em;
  }
     .style1
     {
         width: 135px;
     }
     .style2
     {
         width: 86px
     }
     .style3
     {
         width: 232px;
     }
     .style4
     {
         width: 29px;
     }
     input[type="text"]
     {
         width:50px;
     }
    .style1> .mahd
     {
         width:100px;
     }
     .a
     {
         padding:12px;
         border:1px solid #4F99C6;
         background:#4F99C6;
         color:White;
         text-decoration:none;
     }
     .a:hover
     {
          padding:10px;
         border:1px solid #4F99C6;
         background:#4F99C6;
         color:White;
         text-decoration:none;
     }
     #tb tbody tr td table tbody
     {
         width:0px;
      }
    #tb >table >tr >td
    {
        width:0px;
        }
        #tb input[type="text"]
        {
            width:250px;
        }
        .gia
        {
            width:100px;
        }
  </style>
 <script type="text/javascript">
//<![CDATA[
     function OpenPopup(Url, WindowName, width, height, extras, scrollbars) {
         var wide = width;
         var high = height;
         var additional = extras;
         var top = (screen.height - high) / 2;
         var leftside = (screen.width - wide) / 2; newWindow = window.open('' + Url +
'', '' + WindowName + '', 'width=' + wide + ',height=' + high + ',top=' +
top + ',left=' + leftside + ',features=' + additional + '' +
',scrollbars=1');
         newWindow.focus();
     }
//]]>
</script>
</asp:Content>
<asp:Content ContentPlaceHolderID="maint" runat="server">
    <div style="float:right">
<asp:LinkButton runat="server" ID="lbtnthemmoi" CssClass="btn btn-info" onclick="lbtnthemmoi_Click" 
              >Thêm mới</asp:LinkButton>
</div>

<fieldset>
 <legend>Quản lí hóa đơn xuất</legend>
<table width="700px" id="tb" border="0px">
<tr>
<td>Chọn nhóm mặt hàng</td>
<td>Chọn khách hàng</td>
<td>Giá sản phẩm</td>
</tr>
<tr>
<td><asp:DropDownList ID="Dlnhomhang" runat="server" AutoPostBack="True" 
         onselectedindexchanged="Dlnhomhang_SelectedIndexChanged"></asp:DropDownList></td>
<td><asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
     </asp:ToolkitScriptManager>
     <asp:ComboBox ID="comboboxs" runat="server" CssClass="combo" 
         AutoCompleteMode="SuggestAppend" AutoPostBack="True" 
         onselectedindexchanged="comboboxs_SelectedIndexChanged1">
     </asp:ComboBox></td>
<td><input type="text" runat="server" id="txtgiakh" class="gia" /></td>
</tr>
</table>
 <table style=" margin-top:10px;">
  <tr>
  <td class="style1">
  Mã hóa đơn
  </td>
  <td class="style3">
  Mặt hàng
  </td>
  <td class="style2">
  Số lượng
  </td>
  <td class="style4">
  Đơn giá
  </td>
  <td>Số lượng vỏ về</td>
  <td>
  Giảm % 
  </td>
  <td>
  Nhân viên
  </td>
  </tr>
  <tr>
  <td class="style1">
 <input type="text" runat="server" id="txtmahdx" class="mahd"/>
  </td>
  <td class="style3">
  <asp:DropDownList ID="Dlmathang" runat="server">
    </asp:DropDownList>
  </td>
  <td class="style2">
   <input type="text" runat="server" id="txtsoluong" />
   <asp:HiddenField ID="hfton" runat="server" />
        <asp:HiddenField ID="hfxuat" runat="server" />
  </td>
  <td class="style4">
   <input type="text" runat="server" id="txtdongia" />
  </td>
  <td>
   <input type="text" runat="server" id="txtsoluongvove" />
  </td>
  <td>
   <input type="text" runat="server" id="txtpt" />
  </td>
  <td>
  <asp:DropDownList ID="dlnhanvien" runat="server"></asp:DropDownList>
  </td>
  </tr>
 </table>
 <div style="margin-top:15px;">
 Tình trạng : 
 Thanh toán <input type="radio" runat="server" id="rdtt" name="rd" />
    Chưa thanh toán <input type="radio" runat="server" id="rdchuatt" name="rd" />
 </div>
 <div style="margin-top:15px;">
  <asp:LinkButton runat="server" ID="lbtncapnhap" CssClass="btn btn-info" 
               onclick="lbtncapnhap_Click">Cập nhập</asp:LinkButton>
               &nbsp
              <a  class="a" href="javascript: void(0);" onclick=" javascript:OpenPopup('HoaDonXuat.aspx','WindowName','510','280','scrollbars=1');">In hóa đơn</a>
              
 </div>
 <%--<table>
  <tr>
    <td>
       Mã hóa đơn xuất
    </td>
    <td>
    <input type="text" runat="server" id="txtmahdx" />
    </td>
  </tr>
  <tr>
    <td>
       khách hàng
    </td>
    <td>
 <asp:DropDownList ID="comboboxs" runat="server"></asp:DropDownList>
    </td>
  </tr>
  <tr>
    <td>
       Mặt hàng
    </td>
    <td>
    <asp:DropDownList ID="Dlmathang" runat="server">
    </asp:DropDownList>
    </td>
  </tr>
    <tr>
    <td>
        <asp:HiddenField ID="hfton" runat="server" />
        <asp:HiddenField ID="hfxuat" runat="server" />
       Số lượng
    </td>
    <td>
    <input type="text" runat="server" id="txtsoluong" />
    </td>
  </tr>
  <tr>
  <td>
  Số lượng vỏ về :
  </td>
  <td>
  <input type="text" runat="server" id="txtsoluongvove" />
  </td>
  </tr>
  <tr>
  <td>
  Giảm % :
  </td>
  <td>
  <input type="text" runat="server" id="txtpt" />
  </td>
  </tr>
    <tr>
    <td>
       Đơn giá
    </td>
    <td>
    <input type="text" runat="server" id="txtdongia" />
    </td>
  </tr>
  <tr>
   <td>
    Nhân viên
   </td>
   <td>
   <asp:DropDownList ID="dlnhanvien" runat="server"></asp:DropDownList>
   </td>
  </tr>
      <tr>
    <td>
       Tình trạng
    </td>
    <td>
    Thanh toán <input type="radio" runat="server" id="rdtt" name="rd" />
    Chưa thanh toán <input type="radio" runat="server" id="rdchuatt" name="rd" />
    </td>
  </tr>
  <tr>
    <td colspan="2" align="center">
       <asp:LinkButton runat="server" ID="lbtncapnhap" CssClass="btn btn-info" 
               onclick="lbtncapnhap_Click">Cập nhập</asp:LinkButton>
    </td>
  </tr>
 </table>--%>
</fieldset>
<asp:GridView ID="Grdanhsach" runat="server" AutoGenerateColumns="False">
    <Columns>
    <asp:TemplateField HeaderText="STT">
    <ItemTemplate>
    <%# Container.DataItemIndex+1 %>
    </ItemTemplate>
    </asp:TemplateField>
        <asp:BoundField DataField="khachhang" HeaderText="Khách hàng" />
        <asp:BoundField DataField="mathang" HeaderText="Mặt hàng" />
        <asp:BoundField DataField="soluong" HeaderText="Số lượng" />
        <asp:BoundField DataField="dongia" HeaderText="Đơn giá" />
        <asp:BoundField DataField="tongtien" HeaderText="Tổng tiền" />
    </Columns>
    </asp:GridView>
</asp:Content>

